home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 013a / tty_em.zip / READ.ME next >
Text File  |  1991-11-22  |  3KB  |  76 lines

  1. % Apple Laserwriters have a Diablo 630 emulation mode, but most
  2. % other postscript printers cannot print a simple DOS file on a
  3. % Novell network.
  4. %
  5. % TTY-EMU.PDF is a Novell print definition that contains a 
  6. % print header which is actually a postscript program to emulate a 
  7. % TTY device (A generic printer) on a postscript printer.
  8. %
  9. % TTY-EMU.PS is the striped-down version of this 250 byte program.
  10. % The bottom of this READ.ME is the commented version.
  11. %
  12. % To use: 
  13. % Run PRINTDEF, Import TTY-EMU.PDF
  14. % Run PRINTCON to set up a job configuration which uses TTY-EMU
  15. % Set PRINT HEADER=255 in your SHELL.CFG (create in same subdir as NETx.COM
  16. % Run CAPTURE with JOB=your new print job configuration 
  17. %
  18. % This small program represents dozens of hours of labor and reams of paper.
  19. % The logic was not to difficult, but getting it packed into 255 bytes
  20. % (Novell's print header limit) was a huge challenge.
  21. % If you find this work to be of benefit to you or your company,
  22. % I do request that you send $10 to:
  23. %   SCOTT MEYER 
  24. %   1611 PALM DRIVE
  25. %   FORT COLLINS, CO  80526
  26. %
  27. % Known problems and limitations:
  28. % Extra page after well behaved form feeding applications
  29. % ... try to switch to line output instead of form feeding.
  30. % ... try to supress the application's end of document form feed.
  31. % No extended IBM character set
  32. % On some printers, small jobs (like print screens) may print fine,
  33. % but terminate with a postscript error.
  34. % ... some postscript printers have a problem with end-of-file on small jobs.
  35. % ... I don't have a fix.
  36. %
  37. % These problems could all be easily solved if the program could be any 
  38. % larger than 255 bytes.  But it can't...
  39.  
  40.                                      % PROCEDURE DEFINITIONS
  41.  
  42. /H{30 756 moveto}def                 % HOME: set current point to upper left.
  43.  
  44. /P{showpage H}def                    % PAGE: output existing page and HOME.
  45.  
  46. /R                                   % RETURN: process carriage return
  47.   {
  48.   30                                 % Get new X
  49.   currentpoint exch pop              % Get current Y
  50.   11.3 sub dup                       % Go subtract 11.3 points from Y
  51.   18 le                              % Check if Y is less than 18 points
  52.     {pop pop P}                        % less: throw away X & Y then PAGE
  53.     {moveto}ifelse                     % greater: moveto new X,Y.
  54.   }def
  55.  
  56. /F                                   % FILE: read and print file.
  57.   {
  58.     {  
  59.     currentfile 512 string readline  % Read from current file, Push on stack
  60.     not{exit}if                      % if end of file then terminate
  61.     (\f)search                       % search for formfeed
  62.     {exch pop show P}if              % if formfeed: print first part, then PAGE
  63.     show R                           % print whatever is left, then RETURN
  64.     }loop                            % keep going
  65.   P                                  % output PAGE when done
  66.   }def
  67.  
  68.                                      % START OF EXECUTING CODE
  69.                                      % Set 10 point courier font
  70. /Courier findfont 10 scalefont setfont   
  71.                                      % Execute HOME then FILE.  
  72.                                      % All remaining text after the "F" will
  73.                                      % be treated as incoming ASCII text.
  74. H F
  75.  
  76.